<script setup>
import { onMounted, ref, getCurrentInstance, inject } from 'vue';
// import {webTake} from '../api/site/webSiteTemplate.js'
defineProps({
    msg: String
});
const message = inject('message');
const { proxy } = getCurrentInstance();
const count = ref(0);
const webTakeVal = ref('默认值');
const pageInfo = ref({
    currentPage: 1,
    pageSize: 10,
    total: 100
});
onMounted(() => {
    /* 	webTake().then((res)=>{
				console.log('结果',res);
			}) */
    // console.log('this.request',getCurrentInstance().appContext.config.globalProperties.$request);

    proxy.$request.webSiteTemplate.webTake2().then((res) => {
        // console.log('proxy结果',res);
        webTakeVal.value = res + 'haha';
    });
    // console.log('$customMsg',getCurrentInstance());
});
const pageChange = (page) => {
    // console.log('pageChange:pageInfo', page);
    if (page.currentPage) {
        pageInfo.value.currentPage = page.currentPage;
    }
    if (page.pageSize) {
        pageInfo.value.pageSize = page.pageSize;
    }
};
const testMessage = () => {
    message.suc('hello');
};
</script>

<template>
    <div class="hello-world-wrap">
        <div class="item">const { proxy } = getCurrentInstance()</div>
        <div class="item">proxy.$request.webSiteTemplate.webTake2().then((res) => { // console.log('proxy结果',res); webTakeVal.value = res + 'haha'; });</div>
    </div>
</template>
<style scoped>
.hello-world-wrap {
    height: 1000px;
}
.hello-world-wrap > .item {
    height: 40px;
}
</style>
